16. Challenge!

16 Challenge!

Sleeping a C++ program on a Linux based system:

  1. Include the “unistd” header file:
#include <unistd.h>
  1. Implement the usleep function which accepts an integer value denoting the time in microseconds:
usleep(microseconds);// usleep(5000000) pause for 5 seconds